<template>
  <div class="home">
    <tabbar>
      <div slot="left">
        <i class="iconfont icon-xiangzuojiantou"></i>
      </div>
      <div slot="center" @click="gocity">{{$store.state.address}}</div>
      <div slot="right" style="transform: rotateY(180deg)">
        <i class="iconfont icon-xiangzuojiantou"></i>
      </div>
    </tabbar>
    <foodlist></foodlist>
    <restaurants></restaurants>
  </div>
</template>

<script>
import tabbar from "../../components/tabbar.vue";
import foodlist from "../home/foodlist.vue";
import restaurants from "./restaurants.vue";
export default {
  data() {
    return {
      geohash: [],
    };
  },
  methods: {
    gocity() {
      this.$router.push("/address");
    },
  },
  components: {
    tabbar,
    foodlist,
    restaurants,
  },
  mounted() {
    console.log(this.$router);
    // let arr = this.$route.query.geohash.split(",");
    // console.log(arr);
    // var address = arr.join(",");
    // this.geohash = address.split(",");
    // console.log(this.geohash);
  },
};
</script>

<style>
.home {
  text-align: center;
}
.home i {
  font-size: 22px;
  color: white;
}
</style>